<?php
namespace XtwsBack\Controller;
use Think\Controller;

class XtwsUserController extends CommonController {

    // 后台管理员列表
    public function index(){
        $bc_admin = M('bc_admin');
        $list = $bc_admin->select();
        $this->assign('list',$list);
        $this->display();
    }//end fun

    // 删除
    public function del(){
        $id  = intval(I('id'));
        if($id){
            $bc_admin = M('bc_admin');
            $res = $bc_admin->delete($id);
            if($res){
                $this->success('删除成功');
            }else{
                $this->error('出错啦，请检查');
            }
        }else{
            $this->error('请先选择数据');
        }

    }//end fun

}